package com.tbs.easyhomemoneyserver.form

import io.swagger.annotations.ApiModel
import io.swagger.annotations.ApiModelProperty
import java.io.Serializable
import javax.validation.constraints.Pattern

@ApiModel
data class LoginForm(
    @ApiModelProperty(value = "用户名", required = true)
    @Pattern(regexp = "^[a-zA-Z0-9_]{6,}$", message = "用户名必须包含英文数字且长度>=6")
    var name: String? = null,

    @ApiModelProperty(value = "密码", required = true)
    @Pattern(
        regexp = "^(?=.*[a-z])(?=.*[A-Z])(?=.*\\d)[a-zA-Z\\d]{8,}$", message = "密码长度>=8且必须包含大小写字母和数字"
    )
    var password: String? = null
):Serializable
{
    companion object {
        private const val serialVersionUID = 1L
    }

}
